﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Xiaov.SmartWeb.Infrastructure.ExtMethod;
using Xiaov.SmartWeb.Infrastructure.Common;
using System.Text;
namespace Xiaov.SmartWeb.Application.PluginSrc.StatisticalSystem.ReportDesign.Json
{
    /// <summary>
    /// 为属性面板提供数据
    /// </summary>
    public partial class GetGridConfig : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string node = Request.QueryString["tn"].ToRequestString();
            string xml = Request.QueryString["xml"].ToRequestString();
            string xmlpath = "//PluginSrc//StatisticalSystem//Xml//"+xml;
            Response.Clear();
            Xiaov.SmartWeb.Model.Statistical.GridConfig gc = new Model.Statistical.GridConfig(node, xmlpath);
            StringBuilder sb = new StringBuilder();
            sb.Append("{\"total\":7,");
            sb.Append("\"rows\":[");
            //sb.Append("{\"name\":\"Name\",\"value\":\"Bill Smith\",\"group\":\"ID Settings\",\"editor\":\"text\"}");
            sb.Append("{\"name\":\"文件\",\"value\":\"" + gc.XmlPath + "\",\"group\":\"配置信息\"},");
            sb.Append("{\"name\":\"节点\",\"value\":\"" + gc.Tn + "\",\"group\":\"配置信息\"},");
            sb.Append("{\"name\":\"隐藏列\",\"value\":\"" + gc.HiddenColumn + "\",\"group\":\"配置信息\"},");
            sb.Append("{\"name\":\"隐藏行\",\"value\":\"" + gc.HiddenRow + "\",\"group\":\"配置信息\"},");
            sb.Append("{\"name\":\"锁定列\",\"value\":\"" + gc.NotAllowEditColumn + "\",\"group\":\"配置信息\"},");
            sb.Append("{\"name\":\"锁定行\",\"value\":\"" + gc.NotAllowEditRow + "\",\"group\":\"配置信息\"},");
            sb.Append("{\"name\":\"锁定区域\",\"value\":\"" + gc.NotAllowEditCells + "\",\"group\":\"配置信息\"},");
            sb.Append("{\"name\":\"列\",\"value\":\"\",\"group\":\"属性\"},");
            sb.Append("{\"name\":\"行\",\"value\":\"\",\"group\":\"属性\"},");
            sb.Append("{\"name\":\"单元格\",\"value\":\"\",\"group\":\"属性\"},");
            sb.Append("{\"name\":\"区域\",\"value\":\"\",\"group\":\"属性\"}");
           
            sb.Append("]}");
            Response.Clear();
            Response.Write(sb.ToString());
            Response.End();
        }
    }
}